package controllers

import (
	"github.com/gin-gonic/gin"
	"go-admin-api/dto"
	models "go-admin-api/models/dataBaseModels"
	"net/http"
)

// Name will print hello name
// @Summary Print
// @Accept json
// @Tags Name
// @Security Bearer
// @Produce  json
// @Param name path string true "name"
// @Resource Name
// @Router /hello1/{name} [get]
// @Success 200
func Info(ctx *gin.Context) {
	user, _ := ctx.Get("user")
	ctx.JSON(http.StatusOK, gin.H{"code": 200, "data": gin.H{"user": dto.ToUserDto(user.(models.SysUser))}})
}